Skip to content

Anchor ../ config globs above a verbatim config directory - #1773

Merged
thekevinscott merged 6 commits into
mainfrom
bot/1770-windows-dotdot-glob-1118
Nov 20, 2026
Merged

thekevinscott merged 6 commits into
mainfrom
bot/1770-windows-dotdot-glob-1118

Conversation

@thekevinbot

@thekevinbot thekevinbot commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1770

On Windows the CLI canonicalizes -c to a verbatim \\?\ path. absolute_target joined a written ../... (or ~/...) suffix onto it whole, and under a verbatim prefix / is not a separator, so the suffix became one literal component and the anchor stayed at the config directory. The suffix is now pushed one separator-delimited part at a time, so normalize folds the .. as it already did for verbatim paths. Non-verbatim and Unix paths build the same components as before.

Red: Windows tests job 135281528712 (run 44440999478):

  • path_table::tests::windows::a_parent_relative_config_glob_climbs_out_of_a_verbatim_config_directory: left: Some(("\\?\C:\work\cfg", "../data/*.json")), right: Some(("\\?\C:\work\data", "*.json"))
  • a_config_table_above_the_config_whose_directory_is_missing_fails_the_query: exited zero; stderr: dirsql: table 'later': glob '../absent/*.json' matched no files under \\?\...\cfg

Manual exercise: dirsql query "SELECT p FROM docs" -c .dirsql.toml with glob ../data/*.json returned the file above the config (Linux; Windows covered by CI).

Changelog / Migrations

  • Changelog fragment added under packages/rust/changelog.d/
  • Migration fragment with the same slug added under packages/rust/migrations.d/

E2E Verification

  • packages/python/e2e-attestations/bot-1770-windows-dotdot-glob-1118.json: uv run python -m pytest tests/e2e/declared_table_name_test.py tests/e2e/query_contract_test.py -x -q -- 12 passed (config-table e2e tests; no e2e test uses ../ globs)
  • packages/ts/e2e-attestations/bot-1770-windows-dotdot-glob-1118.json: just e2e-attest-ts -- 29 passed
  • cargo test --features cli --test cli_config_anchor --test cli_missing_anchor and cargo test --lib path_table pass locally

@thekevinbot
thekevinbot marked this pull request as ready for review November 19, 2026 02:09
@thekevinscott
thekevinscott merged commit 020044e into main Nov 20, 2026
89 checks passed
@thekevinscott
thekevinscott deleted the bot/1770-windows-dotdot-glob-1118 branch November 20, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

On Windows the CLI ignores ../ config globs

2 participants